    /***
     * @description axios封装
     * @file api.ts
     * @author andy
     * @date 2024/3/22 16:40
     */
// file:api.s
// 1、导入axios以及拦截器
import service from './request'

// demo接口1
export const demo1 = (data:any) => {
    return service({
        url: '/user/user/demo1/' + data,
        method: 'post'
    })
};
// 发送验证码
export const sendCode = (mobile:any) => {
    return service({
        url: '/user/index/sendCode/'+mobile,
        method: 'post'
    })
};


// demo接口2
export const demo2 = (data:any) => {
    return service({
        url: '/user/user/demo2',
        method: 'post',
        data
    })
};
// 用户注册
export const enrollUser = (data:any) => {
    return service({
        url: '/user/index/enrollUser',
        method: 'post',
        data
    })
};

// 用户登录
export const userLogin = (data:any) => {
    return service({
        url: '/user/index/userLogin',
        method: 'post',
        data
    })
};
// 菜单树
export const getMenuTree = () => {
    return service({
        url: '/user/index/getMenuTree',
        method: 'post'
    })
};
// 品牌列表
export const getBrandList = (data:any) => {
    return service({
        url: '/prod/index/getBrandList',
        method: 'post',
        data
    })
};
// 品牌修改状态
export const changeBrandStatus = (data:any) => {
    return service({
        url: '/prod/index/changeBrandStatus',
        method: 'post',
        data
    })
};
// 品牌修改状态
export const addBrand = (data:any) => {
    return service({
        url: '/prod/index/AddBrand',
        method: 'post',
        data
    })
};
// 添加类型
export const addType = (data:any) => {
    return service({
        url: '/prod/type/addType',
        method: 'post',
        data
    })
};
// 商品分类树形结构
export const getTypeTree = (data:any) => {
    return service({
        url: '/prod/type/getTypeTree',
        method: 'post',
        data
    })
};
// 商品列表
export const getProdList = (data:any) => {
    return service({
        url: '/prod/prod/getProdList',
        method: 'post',
        data
    })
};
// 标签列表
export const getTag = () => {
    return service({
        url: '/prod/prod/getTag',
        method: 'post',
        
    })
};

// 字典表
export const getDictList = (brandId:any) => {
    return service({
        url: '/prod/dict/getDictList/'+ brandId,
        method: 'post',
        
    })
};
// 添加商品
export const addProdList = (data:any) => {
    return service({
        url: '/prod/prod/addProdList',
        method: 'post',
        data
    })
};

// 添加树形下拉框
export const getSelectTypeTree = () => {
    return service({
        url: '/prod/prod/getSelectTypeTree',
        method: 'post',
        
    })
};

//  批量删除商品
export const deleteBatchProd = (data:any) => {
    return service({
        url: '/prod/prod/deleteBatchProd',
        method: 'post',
        data
    })
};
//  批量删除订单
export const deleteOrder = (data:any) => {
    return service({
        url: '/prod/order/deleteOrder',
        method: 'post',
        data
    })
};
//  添加附件
export const addProdAtta = (data:any) => {
    return service({
        url: '/prod/prod/addProdAtta',
        method: 'post',
        data
    })
};
//  订单列表
export const getOrderList = (data:any) => {
    return service({
        url: '/prod/order/getOrderList',
        method: 'post',
        data
    })
};
//  添加订单
export const addOrder = (data:any) => {
    return service({
        url: '/prod/order/addOrder',
        method: 'post',
        data
    })
};
//  订单信息表
export const getProdInfoList = () => {
    return service({
        url: '/prod/prod/getProdInfoList',
        method: 'post',
        
    })
};

